<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title></title>
<link rel="stylesheet" href="../layui/css/layui.css">
<link rel="stylesheet" href="../css/general.css">
<link rel="stylesheet" href="../css/separate_accounts.css">
</head>
<body class="layui-layout-body">
<div id="separate_accounts-template" class="layui-layout layui-layout-admin">
	<div class="layui-header">
		<div class="layui-logo"><img src="../img/common/logo.jpg" alt=""></div>
		<!-- 头部区域（可配合layui已有的水平导航） -->
		<h1>魔力公寓</h1>
		<ul class="layui-nav layui-layout-right">
			<li class="layui-nav-item"> <a href="javascript:;">{{userinfo.loginName}}<img src="../img/common/icon07.gif" class="layui-nav-img"></a>
				<dl class="layui-nav-child">
					<dd><a href="../staff/modify_password.html"><img src="../img/common/icon08.png" alt=""><span>修改密码</span></a></dd>
					<dd><a href="../staff/bank_card.html"><img src="../img/common/icon09.png" alt=""><span>银行卡信息</span></a></dd>
					<dd><a href="javascript:;" @click.stop="doLogout"><img src="../img/common/icon10.png" alt=""><span>安全退出</span></a></dd>
				</dl>
			</li>
		</ul>
	</div>
	<div class="layui-side layui-bg-black">
		<div class="layui-side-scroll"> 
			<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
			<ul class="layui-nav layui-nav-tree"  lay-filter="test">
				<li class="layui-nav-item"><a href="../survey/index.html"><img src="../img/common/icon01.png" alt="">概况</a></li>
				<li class="layui-nav-item"><a href="../rental/index.html"><img src="../img/common/icon02.png" alt="">租务</a></li>
				<li class="layui-nav-item"><a href="../financial_affairs/index.html"><img src="../img/common/icon03.png" alt="">财务</a></li>
				<li class="layui-nav-item"><a href="../reports/index.html"><img src="../img/common/icon04.png" alt="">报表</a></li>
				<li class="layui-nav-item on"><a href="../separate_accounts/index.html"><img src="../img/common/icon05.png" alt="">分账</a></li>
				<li class="layui-nav-item"><a href="../staff/index.html"><img src="../img/common/icon06.png" alt="">员工</a></li>
			</ul>
		</div>
	</div>
	<div class="layui-body"> 
		<!-- 内容主体区域 -->
		<div class="leftContent">
			<p class="layui-title">分账管理</p>
			<ul class="layui-menu">
				<li><a href="index.html">分账方</a></li>
				<li><a href="template.html" class="on">分账模板</a></li>
			</ul>
		</div>
		<div class="rightContent">
			<div class="section">
				<div class="add"><a href="javascript:;" @click="openAdd" class="layui-btn">添加分账模板</a></div>
				<table class="layui-table" lay-even>
					<colgroup>
					<col width="12%">
					<col width="38%">
					<col width="38%">
					<col width="12%">
					</colgroup>
					<thead>
						<tr>
							<th>分账名称</th>
							<th>分账比例</th>
							<th>分账项目</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody v-if="tempList.length>0">
						<tr v-for="t in compTempList">
							<td><span v-text="t.tempName">房租分账</span></td>
							<td v-text="t.payeeStr">42号商城20%，谭新年80%</td>
							<td v-text="t.items">魔力公寓1（房租）、魔力公寓2（房租）</td>
							<td><a href="javascript:;" @click="openEdit(t.tempId)" class="layui-btn">编辑</a></td>
						</tr>
					</tbody>
				</table>
				<div v-if="tempList.length==0" class="nothing-box">暂无分账方</div>
				<div v-show="isShowDetail" class="template-content">
					<div class="close"><img @click="isShowDetail=!isShowDetail" src="../img/common/close_img.gif" alt=""></div>
					<form class="layui-form" action="">
						<p class="headline">分账模板</p>
						<p class="template-title">模板名称<span v-if="status.template.tempName.isError" class="error">请输入模板名称</span></p>
						<div class="layui-input-block">
							<input type="text"
								   @focus="changeStatus(['template', 'tempName'], 'isActive')"
								   @blur="changeStatus(['template', 'tempName'], 'isFinish')"
								   v-model.trim="temp.tempName" placeholder="默认房租1" autocomplete="off" class="layui-input" :class="status.template.tempName">
						</div>
						<p class="template-title">分账比例（<span v-text="total+'%'"></span>／100%）<span v-if="status.template.payees.isError" class="error">请输入有效数值</span></p>
						<ul class="item-list">
							<li v-for="(p, i) in temp.payees">
								<div class="layui-input-inline">
									<input type="text" v-model.trim="p.userId" autocomplete="off" class="layui-input layui-input02">
									<span class="flow" v-text="i+1"></span> </div>
								<div class="layui-input-inline">
									<input type="number" v-model.number="p.percent" autocomplete="off" class="layui-input">
									<span class="proportion">%</span> </div>
								<div class="delete"><img @click="deletePayee(p)" src="../img/common/icon22.gif" alt=""></div>
							</li>
						</ul>
						<div class="add-item">添加项目</div>
						<ul class="submit">
							<li>
								<button @click.prevent="saveTemp" class="layui-btn layui-btn-primary" lay-submit lay-filter="formDemo">保存</button>
							</li>
						</ul>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="../layui/layui.js"></script>
<script src="../js/jquery-3.3.1.min.js"></script>
<script src="../js/moment.min.js"></script>
<script src="../js/storejson2.min.js"></script>
<script src="../js/mock.js"></script>
<script src="../js/mockdata.js"></script>
<script src="../js/vue.min.js"></script>
<script src="../js/vue.global.js"></script>
<script src="../js/separate_accounts/template.js"></script>
<!--<script>
//JavaScript代码区域
layui.use('element', function(){
  var element = layui.element;
  
});


//Demo
layui.use('form', function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(formDemo)', function(data){
    layer.msg(JSON.stringify(data.field));
    return false;
  });
});

//注意：选项卡 依赖 element 模块，否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
  
  //…
});

</script>-->
</body>
</html>